import java.util.*;
public class ListTest {

public static void main(String[] arr)
{
	List<String> arrlist = new ArrayList<String>();
	arrlist.add("A");
	arrlist.add("B");
	arrlist.add("C");
	arrlist.add("D");
	Iterator<String> at = arrlist.iterator();
	while(at.hasNext())
	{
		System.out.println(at.next());
	}
	System.out.println("ArrayList 크기 출력 : "+arrlist.size());

	List<String> linkedlist = new LinkedList<String>();
	linkedlist.add("a");
	linkedlist.add("b");
	linkedlist.add("c");
	linkedlist.add("d");
	linkedlist.add("e");
	Iterator<String> lat = linkedlist.iterator();
	while(lat.hasNext())
	{
		System.out.println(lat.next());
	}
	System.out.println("LinkedList 크기출력 : "+linkedlist.size());
	arrlist.clear();
	linkedlist.clear();
	System.out.println("-리스트 초기화-");
	System.out.println("ArrayList 크기 : "+arrlist.size()+
			   "LinkedList크기 : "+linkedlist.size());

	}


	

}
